package tweeks.category.domain;

import java.util.List;

import tweeks.common.domain.UUIDEntity;

public class Category extends UUIDEntity {
	
	private static final long serialVersionUID = -5545802294469149471L;

	private String parentId;
	
	private String name;

	private int orderNo = 0;
	
	private int level = 0;
	
	private List<Category> children;
	
	public boolean isValid() {
		return getId() != this.parentId
				&& this.name != null
				&& !"".equals(this.name);
	}
	
	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public int getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(int orderNo) {
		this.orderNo = orderNo;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public List<Category> getChildren() {
		return children;
	}

	public void setChildren(List<Category> children) {
		this.children = children;
	}
	
}
